#pragma once

namespace IDK
{
	//ManagedObject
	public ref class ManagedObject
	{
		typedef UnManaged::System::IObject Self;

		ManagedObject()// noncreatable
		{}
	public:
		ManagedObject(Self* self) : mSelf(self)
		{
			mSelf->_AddRef();
		}

		!ManagedObject(void)
		{
			mSelf->_Release();
		}

		~ManagedObject(void)
		{
			this->!ManagedObject();
		}
		Self* GetSelf(void) { return mSelf; }
	private:
		Self* mSelf;
	};
}